package com.yupi.cli.pattern;

/**
 * 打开命令
 */
public class TurnOnCommand implements Command {
    public Device device;

    /**
     * 绑定设备
     * @param device
     */
    public TurnOnCommand(Device device) {
        this.device = device;
    }

    /**
     * 调用设备的打开方法
     */
    public void execute(){
        device.turnOn();
    }
}
